 package cn.fly.web.controller;

 import cn.fly.Util.AnnotationUtil;
 import cn.fly.Util.ClassUtil;
 import cn.fly.entity.Account;
 import cn.fly.service.impl.AccountServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;

 import java.util.List;

 @Controller
 public class TestController {

     @Autowired
     AccountServiceImpl accountService ;

     @RequestMapping(value="/test",method=RequestMethod.GET)
     @ResponseBody
     public String login(){
         List<Account> list = accountService.findAcc(null);
         return "signIn";
     }
     public static void main(String[] args) throws InstantiationException, IllegalAccessException {
         // 获取特定包下所有的类(包括接口和类)
         List<Class<?>> clsList = ClassUtil.getAllClassByPackageName("cn.itlaobing.service");
         //输出所有使用了特定注解的类的注解值
         AnnotationUtil.showField(clsList);
     }
 }
